The CT Get legend text command returns the text of the specified legend item.
legendItem is the number of the series (or category for a pie chart) in the legend. However, if the legend order has been reversed, legendItem reflects the original order, not the reversed order.
This example returns the legend text of the first series in the chart specified by $ChartID.